package com.xzgj.api.convert;

import com.xzgj.api.dto.data.DemoAddDto;
import com.xzgj.api.entity.DemoEntity;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

/**
 * @author hxh
 * @version 1.0.0
 * @date 2024/3/8
 */
@Mapper(componentModel = "spring")
public interface DemoEntityConvert {
    /**
     * DemoAddDto转换DemoEntity
     * @param demoAddDto
     * @return
     */
    @Mapping(target = "name", source = "name")
    DemoEntity toEntity(DemoAddDto demoAddDto);
}
